package com.parse.factory;

import com.parse.productFactory.JpgFactory;
import com.parse.productFactory.ProduceImageFunction;
import com.parse.util.FileFormat;

import java.io.File;

public class ImageFactory implements AbstractFactory {
    private ProduceImageFunction produceImageFunction;

    public ImageFactory(ProduceImageFunction produceImageFunction) {
        this.produceImageFunction = produceImageFunction;
    }

    public ImageFactory() {
    }

    @Override
    public void convertToImage(File file) {
        produceImageFunction.concertToGif();
    }

    @Override
    public void convertToDocument(File file) {

    }

    @Override
    public void convertToVideo(File file) {

    }

    @Override
    public void convertToAudio(File file) {

    }

    @Override
    public Convertor createConvertor(FileFormat fileFormat,File file) {
        return new Convertor(fileFormat,file);
    }

    public Convertor createConvertor(FileFormat fileFormat,File file,File watermarkFile) {
        return new Convertor(fileFormat,file);
    }
}
